import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './actions'
import getters from './getters'
import storage from '../utils/storage'
import { USER_TOKEN } from './action-type'

Vue.use(Vuex)

const state = {
  [USER_TOKEN]:storage.getItem(USER_TOKEN),
  userInfo:storage.getItem("USER_INFO"),
  cachePages:["SmartChat","FFans","Article","UserDetail"]
}

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  modules:{}
})
